﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FtpWorkerRole
{
    public class PerformanceSpecifier
    {
        // Processor
        public static readonly string ProcessorTime = @"\Processor(_Total)\% Processor Time";

        // Memory
        public static readonly string MemoryAvailableBytes = @"\Memory\Available Bytes";
        public static readonly string MemoryCommittedBytes = @"\Memory\Committed Bytes";

        // Network Interface(*)
        public static readonly string NetworkBytesSent = @"\Network Interface(*)\Bytes Sent/sec";
        public static readonly string NetworkBytesReceived = @"\Network Interface(*)\Bytes Received/sec";

        // APS.NET Applications(__Total__) 
        public static readonly string RequestsTotal = @"\ASP.NET Applications(__Total__)\Requests Total";
        public static readonly string RequestsRate = @"\ASP.NET Applications(__Total__)\Requests/Sec";
        public static readonly string RequestsUnauthorized = @"\ASP.NET Applications(__Total__)\Requests Not Authorized";
        public static readonly string RequestsTimedOut = @"\ASP.NET Applications(__Total__)\Requests Timed Out";
        public static readonly string RequestsNotFound = @"\ASP.NET Applications(__Total__)\Requests Not Found";
        public static readonly string RequestsErrorRaised = @"\ASP.NET Applications(__Total__)\Request Error Events Raised";

        private static List<string> list;
        public static List<string> GetSpecifiers()
        {
            if (list == null)
            {
                list = new List<string>();
                list.Add(ProcessorTime);
                list.Add(MemoryAvailableBytes);
                list.Add(MemoryCommittedBytes);
                list.Add(NetworkBytesReceived);
                list.Add(NetworkBytesSent);
            }
            return list;
        }
    }
}